package com.xxxt.jxj.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xxxt.dao.CommentMapper;
import com.xxxt.entity.Comment;
import com.xxxt.entity.Company;
import com.xxxt.entity.Practice;
import com.xxxt.entity.Student;
import com.xxxt.jxj.service.CommentService;

@Service
@Transactional
public class CommentServiceImpl implements CommentService {
	@Resource
	private CommentMapper commentMapper;

	@Override
	public List<Practice> findPracticeByStudentAndCompany(String sno, String companyId) {
		// TODO Auto-generated method stub
		return commentMapper.findPracticeByStudentAndCompany(sno, companyId);
	}
	@Override
	public Company findCompany(String companyId) {
		// TODO Auto-generated method stub
		return commentMapper.findCompany(companyId);
	}

	@Override
	public Student findStudent(String sno) {
		// TODO Auto-generated method stub
		return commentMapper.findStudent(sno);
	}

	@Override
	public boolean insertComment(Comment comment) {
		// TODO Auto-generated method stub
		return commentMapper.insertComment(comment);
	}

	@Override
	public List<Comment> findCommentByCompany(String companyId, int pageSize, int pageNum) {		
		// TODO Auto-generated method stub
		return commentMapper.findCommentByCompany(companyId);
	}
	@Override
	public List<Comment>  findCommentContentByStudentAndCompany(String sno, String companyId) {
		// TODO Auto-generated method stub
		return commentMapper.findCommentContentByStudentAndCompany(sno, companyId);
	}

	@Override
	public boolean updateComment(Comment comment) {
		// TODO Auto-generated method stub
		return commentMapper.updateComment(comment);
	}
	@Override
	public boolean deleteComment(Comment comment) {
		// TODO Auto-generated method stub
		return commentMapper.deleteComment(comment);
	}
	@Override
	public Comment findCommentByCommentId(String commentId) {
		// TODO Auto-generated method stub
		return commentMapper.findCommentByCommentId(commentId);
	}
	@Override
	public List<Comment> findCommentByCompanyAndSno(String sno, String companyId, int pageSize, int pageNum) {
		// TODO Auto-generated method stub
		return commentMapper.findCommentByCompanyAndSno(sno, companyId);
	}



}
